<template>
	<view>
		<u-navbar :is-back="true" title="收益明细"></u-navbar>
		<view class="content">
			<view class='profitType'>
				<view class="title">活动订单</view>
				<view class='con f-c-sb'>
					<view class='item end'  @tap="openActiveOrderList" data-type='1'>
						<view class='subTitle'>入账总额</view>
						<view class='pirc'>￥{{orderData.activityOrder.entryMoney}}</view>
					</view>
					<view class='item wait'  @tap="openActiveOrderList" data-type='2'>
						<view class='subTitle'>待结算总额</view>
						<view class='pirc'>￥{{orderData.activityOrder.nsettlement}}</view>
					</view>
					<view class='item complete'  @tap="openActiveOrderList" data-type='3'>
						<view class='subTitle'>已结算总额</view>
						<view class='pirc'>￥{{orderData.activityOrder.ysettlement}}</view>
					</view>
				</view>
				<view class='con f-c-sb'>
					<view class='item commission'  @tap="openActiveOrderList" data-type='4'>
						<view class='subTitle'>累计佣金收入总金额</view>
						<view class='pirc'>￥{{orderData.activityOrder.commissionMoney}}</view>
					</view>
					<view class='item commission'  @tap="openActiveOrderList" data-type='5'>
						<view class='subTitle'>累计收入总金额</view>
						<view class='pirc'>￥{{orderData.activityOrder.incomeMoney}}</view>
					</view>
				</view>
			</view>
			<view class='profitType'>
				<view class="title">商城订单</view>
				<view class='con f-c-sb'>
					<view class='item end' @tap="openShopOrderList" data-type='1'>
						<view class='subTitle'>入账总额</view>
						<view class='pirc'>￥{{orderData.shoppingOrder.entryMoney}}</view>
					</view>
					<view class='item wait' @tap="openShopOrderList"  data-type='2'>
						<view class='subTitle'>待结算总额</view>
						<view class='pirc'>￥{{orderData.shoppingOrder.nsettlement}}</view>
					</view>
					<view class='item complete' @tap="openShopOrderList" data-type='3'>
						<view class='subTitle'>已结算总额</view>
						<view class='pirc'>￥{{orderData.shoppingOrder.ysettlement}}</view>
					</view>
				</view>
				<view class='con f-c-sb'>
					<view class='item commission' @tap="openShopOrderList" data-type='4'>
						<view class='subTitle'>累计佣金收入总金额</view>
						<view class='pirc'>￥{{orderData.shoppingOrder.commissionMoney}}</view>
					</view>
					<view class='item commission' @tap="openShopOrderList" data-type='5'>
						<view class='subTitle'>累计收入总金额</view>
						<view class='pirc'>￥{{orderData.shoppingOrder.incomeMoney}}</view>
					</view>
				</view>
			</view>
			<view class='profitType'>
				<view class="title">洗车订单</view>
				<view class='con f-c-sb'>
					<view class='item end'  @tap="openWashCarOrderList" data-type='1'>
						<view class='subTitle'>入账总额</view>
						<view class='pirc'>￥{{orderData.washCarOrder.entryMoney}}</view>
					</view>
					<view class='item wait'  @tap="openWashCarOrderList" data-type='2'>
						<view class='subTitle'>待结算总额</view>
						<view class='pirc'>￥{{orderData.washCarOrder.nsettlement}}</view>
					</view>
					<view class='item complete' @tap="openWashCarOrderList" data-type='3'>
						<view class='subTitle'>已结算总额</view>
						<view class='pirc'>￥{{orderData.washCarOrder.ysettlement}}</view>
					</view>
				</view>
				<view class='con f-c-sb'>
					<view class='item commission' @tap="openWashCarOrderList" data-type='4'>
						<view class='subTitle'>累计佣金收入总金额</view>
						<view class='pirc'>￥{{orderData.washCarOrder.commissionMoney}}</view>
					</view>
					<view class='item commission' @tap="openWashCarOrderList" data-type='5'>
						<view class='subTitle'>累计收入总金额</view>
						<view class='pirc'>￥{{orderData.washCarOrder.incomeMoney}}</view>
					</view>
				</view>
			</view>
			<view class='profitType'>
				<view class="title">权益卡订单</view>
				<view class='con f-c-sb'>
					<view class='item end' @tap="openEquityOrderList" data-type='1'>
						<view class='subTitle'>入账总额</view>
						<view class='pirc'>￥{{orderData.rightsOrder.entryMoney}}</view>
					</view>
					<view class='item wait' @tap="openEquityOrderList" data-type='2'>
						<view class='subTitle'>待结算总额</view>
						<view class='pirc'>￥{{orderData.rightsOrder.nsettlement}}</view>
					</view>
					<view class='item complete' @tap="openEquityOrderList" data-type='3'>
						<view class='subTitle'>已结算总额</view>
						<view class='pirc'>￥{{orderData.rightsOrder.ysettlement}}</view>
					</view>
				</view>
				<view class='con f-c-sb'>
					<view class='item commission' @tap="openEquityOrderList" data-type='4'>
						<view class='subTitle'>累计佣金收入总金额</view>
						<view class='pirc'>￥{{orderData.rightsOrder.commissionMoney}}</view>
					</view>
					<view class='item commission' @tap="openEquityOrderList" data-type='5'>
						<view class='subTitle'>累计收入总金额</view>
						<view class='pirc'>￥{{orderData.rightsOrder.incomeMoney}}</view>
					</view>
				</view>
			</view>
		</view>
	  
	</view>
</template>

<script>
	import { incomeDetails } from '@/api/my';
	import {mapGetters,mapMutations} from 'vuex'
	
	export default {
		data() {
			return {
				param:{
					storeBasicId:'',
					storeBasicType:''
				},
				orderData:{}
			};
		},
		computed:{
			    ...mapGetters(["userInfo"]),
		
		},
		onLoad(){
			this.param.storeBasicId=this.userInfo.storeBasicId;
			this.param.storeBasicType=this.userInfo.storeBasicType;
			this.init();
		},
		methods:{
			init(){
				this.getData();
				
			},
			getData(){
				incomeDetails(this.param).then(res=>{					
					this.orderData=res.data;	
				})
			},
			openShopOrderList(e){
				let type=e.currentTarget.dataset.type;
				this.$navigateTo('/pages/my/shopDetails',{type:type});
			},
			openActiveOrderList(e){
				let type=e.currentTarget.dataset.type;
				this.$navigateTo('/pages/my/details',{type:type});
			},
			openWashCarOrderList(e){
				let type=e.currentTarget.dataset.type;
				this.$navigateTo('/pages/my/washCarDetails',{type:type});
			},
			openEquityOrderList(e){
				let type=e.currentTarget.dataset.type;
				this.$navigateTo('/pages/my/equityDetails',{type:type});
			}
		}
	}
</script>

<style lang="less">
	.content{
		width: 100%;
		min-height: 100vh;
		background-color: #ededed;
		padding:48rpx 45rpx 28rpx;
		.profitType{
			width: 660rpx;
			height: 401rpx;
			background-color: #fff;
			border-radius: 18rpx;
			padding:0 25rpx 31rpx;
			margin-bottom: 20rpx;
			.title{
				color: #131313;
				font-size: 28rpx;
				line-height: 95rpx;
				font-weight: 700;
			}
			.con{				
				flex-wrap: wrap;

				.item{
					width: 200rpx;
					margin: 10rpx;
					height: 124rpx;
					border-radius: 12rpx;
					box-shadow: -10rpx 0px 15rpx 0 rgba(109,65,255,0.30); 
					flex:1;
					
					view{
						display: block;
						white-space: nowrap;
						line-height: 36rpx;
						height: 36rpx;
						color:#fff;
						text-align: center;
						padding-top:20rpx;
					}
					.subTitle{
						font-size: 24rpx;
					}
					.pirc{
						font-size: 26rpx;
						font-weight: 700;
					}
				}
				.end{
					background: #ff4166;
				}
				.wait{
					background: #6e41ff;
				}
				.complete{
					background: #2ba3ff;
				}
				.commission{
					background: #88939b;
				}
				
			}
			
		}
	
	}
	
	
    
</style>
